-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add webp support #346
Add webp support #346
Conversation
If you need to test it, you can use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use a native Go library like golang.org/x/image/webp
for decoding the webp (and re-encoding as png), there's no need for external tools.
gif -> mp4 only uses ffmpeg because animation is a lot more complicated than static images.
Updated to use |
-uses `golang.org/x/image/webp` to convert webP to PNG in memory - adds modules to `go.mod` and `go.sum`
bcebcb7
to
c4cc24e
Compare
Hey, does this look good? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the variable names (Go uses camelCase)
Looks good, thanks!
adds logic in portal.go to convert webP images to png, since WebP images don't seem to work Matrix -> WhatsApp
uses
golang.org/x/image/webp
to do the conversion in memoryCan be tested using
apmechev/mautrix-whatsapp-test:v0.2.4-4
from dockerhub